<h1>Galerie Photos</h1>

<div class="cadreContenu">
	
	<div class="titleGalery">Photos</div>
	<div id="containerSelect">
		<select id="selectAlbum" onChange="return loadLittleImage();" class="thumbnailAlbums">
		<option value="all">Tout</option>
		<?php 
		require_once ('../connexion.php');
		try{
			$sql = 'SELECT * FROM typesprod';
			$select = $connection->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
			$select->execute();
			while($enregistrement = $select->fetch(PDO::FETCH_OBJ) ){
				?>
				<option value="<?php echo $enregistrement->id;?>"><?php echo $enregistrement->nom;?></option>
				<?php 
			}
		}catch(Exception $e){
			echo "<h3 class='error'>Impossible de charger la galerie</h3>";
		}	
		?>	
		</select>
	</div>
	<div id="contentThumbnail" class="contentThumbnail">
	<?php 
		require_once ('thumbnail.php');
	?>
	</div>
</div>
